package br.com.jmmarca.model;

import org.droidpersistence.annotation.Column;
import org.droidpersistence.annotation.ForeignKey;
import org.droidpersistence.annotation.PrimaryKey;
import org.droidpersistence.annotation.Table;

import br.com.jmmarca.dao.generic.AbstractEntity;

/**
 *
 * @author MICHEL
 */
@Table(name = "visitante")
public class Visitante extends AbstractEntity {
	@PrimaryKey(autoIncrement = true)
    @Column(name = "id")
    private Integer id;
    @Column(name = "nome")
    private String nome;
    @Column(name = "email")
    private String email;  
    @Column(name = "telefone")
    private String telefone;        
    @Column(name = "dhregistro")
    private String dhregistro;
    
    @Column(name = "id_evento")
    @ForeignKey(tableReference = "evento", onDeleteCascade = true, columnReference = "id")     
    private Integer idEvento;

    public Visitante() {
    }

    public Visitante(Integer id) {
        this.id = id;
    }

    @Override
	public Integer getId() {
        return id;
    }

    @Override
	public void setId(Integer id) {
        this.id = id;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getDhregistro() {
        return dhregistro;
    }

    public void setDhregistro(String dhregistro) {
        this.dhregistro = dhregistro;
    }

    public Integer getIdEvento() {
        return idEvento;
    }

    public void setIdEvento(Integer idEvento) {
        this.idEvento = idEvento;
    }

    @Override
    public String toString() {
        return id+" - "+nome;
    }

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelefone() {
		return telefone;
	}

	public void setTelefone(String telefone) {
		this.telefone = telefone;
	}
    
    
    
}
